<template>
  <view class="my">
    <view class="myList">
      <AtList :hasBorder="true">
        <!-- <AtListItem
          :hasBorder="true"
          title='领取收益'
          note='描述信息'
          arrow='right'
          :iconInfo="{ size: 25, color: '#78A4FA', value: 'calendar', }"
        /> -->
        <AtListItem
          v-for="(item,index) in state.integralList"
          :key="index"
          :hasBorder="true"
          :title="item.type"
          :extraText="'+'+item.num"
          :note='item.createTs'
        />
      </AtList>
    </view>
  </view>
</template>

<script setup>
import { onMounted, reactive } from 'vue'
import Taro from "@tarojs/taro"
import request from "../../utils/request";


const state = reactive({
  integralList:[]
})

const redirect = ()=>{
  Taro.navigateTo({
    url: '/pages/order/order'
  })
}

const getIntegralList = async ()=>{
  let {data} = await request("/getIntegralList",'get');
  state.integralList = data;
  console.log(state.integralList);
}

onMounted(()=>{
  getIntegralList()
})


</script>
